//
//  BQScanningViewController.m
//  BeeQuick
//
//  Created by Asun on 2017/7/11.
//  Copyright © 2017年 BecomeRich. All rights reserved.
//

#import "BQScanningViewController.h"
#import "BQScanningView.h"

@interface BQScanningViewController ()


@end

@implementation BQScanningViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor lightGrayColor];
    
    
    if (TARGET_IPHONE_SIMULATOR) {
        UIView *view = [[UIView alloc]initWithFrame:self.view.bounds];
        
        UIImageView *imageVIew = [[UIImageView alloc]initWithFrame:CGRectMake(107,208.5,200, 200)];
        
        imageVIew.image = [UIImage imageNamed:@"pick_bg"];
        
        [view addSubview:imageVIew];
        
        UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(127, 208.5, 160, 10)];
        
        imageView.image = [UIImage imageNamed:@"yellowlight"];
        
        [view addSubview:imageView];
        
        [self.view addSubview:view];
        
        CABasicAnimation *base = [CABasicAnimation animationWithKeyPath:@"position.y"];
        
        base.toValue = @360;
        
        base.duration = 1.5;
        
        base.repeatCount = INT_MAX;
        
        [imageView.layer addAnimation:base forKey:nil];
        
        
    }else{
        
        BQScanningView * scanView = [[BQScanningView alloc]initWithFrame:self.view.bounds];
        
        [self.view addSubview: scanView];
        
    }
}

@end
